package com.wnn.demo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.soap.Text;
import java.sql.Blob;
import java.util.Date;
import java.util.List;

/**
 * Created by zhou Generator on 2021/10/09
*/
@ApiModel("新闻实体类")
@JsonIgnoreProperties(value = {"handler"})
@Table(name = "news")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class News {

    //新闻id
    @Id
    @ApiModelProperty("新闻id")
    @Column(name = "id")
    private String id ;

    //新闻标题
    @ApiModelProperty("新闻标题")
    @Column(name = "titles")
    private String titles;

    //新闻内容
    @ApiModelProperty("新闻内容")
    @Column(name = "content")
    private String content;

    //新闻封面图片
    @ApiModelProperty("新闻封面")
    @Column(name = "picture_url")
    private String pictureUrlpath;

    //新闻封面图片
//    @ApiModelProperty("新闻封面图片")
//
//    private PictureUrl pictureUrl;

    //新闻审核状态  0:草稿 1:审批中 2：审核成功  3.审核失败
    @ApiModelProperty("新闻审核状态")
    @Column(name = "approve_status")
    private Integer approveStatus;


    //	附件
    @ApiModelProperty("新闻上传图片附件")
    @Column(name = "accessory")
    private String accessory;


    //	新闻创建人
    @ApiModelProperty("新闻创建人")
    @Column(name = "create_by")
    private String createBy;

    //新闻审核人
    @ApiModelProperty("新闻审核人")
    @Column(name = "approve_by")
    private String approveBy;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    //	修改时间
    @ApiModelProperty("修改时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "update_time")
    private Date updateTime;


    //	审批开始时间
    @ApiModelProperty("审核开始时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "approve_begin_time")
    private Date approveBeginTime;

    //	审批结束时间
    @ApiModelProperty("审核结束时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "approve_end_time")
    private Date approveEndTime;



    //	附件集合
    @ApiModelProperty("附件集合")
    private List<Accessory> accessories;


    //  附件路径
    @ApiModelProperty("附件路径")
    @Column(name = "hidden_file_path")
    private String hiddenFilePath;

    //   是否已删除：0未删除 1已删除
    @ApiModelProperty(value = "是否已删除：0未删除 1已删除", name = "isDeleted", dataType = "Integer")
    @Column(name = "is_deleted")
    private Integer isDeleted;

    //评价反馈信息
    @ApiModelProperty(value = "评价反馈信息", name = "feedback", dataType = "Feedback")
    private Feedback feedback;




}
